package com.zbb.exam_system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * @author zbbstart
 * @date 2021/2/12 - 12:55
 * 试卷
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "试卷对象", description = "封装了试卷的各个属性后得到的一个实体对象")
public class Paper implements Serializable {
    private static final long serialVersionUID = -5351050090454123719L;
    @TableId(value = "paperId", type = IdType.AUTO)
    @TableField("paperId")
    @ApiModelProperty(name = "paperId", value = "试卷编号自增主键", example = "1")
    private Integer paperId;
    @TableField("paperNo")
    @ApiModelProperty(name = "paperNo", value = "日期+试卷编号", example = "20200212001")
    private String paperNo;
    @TableField("expire")
    @ApiModelProperty(name = "expire", value = "到期时间", example = "2021-05-08 05:23:30")
    private String expire;
    @TableField("scorePerQuestion")
    @ApiModelProperty(name = "scorePerQuestion", value = "每道题目的分数", example = "5")
    private Integer scorePerQuestion;
    @TableField("questionCount")
    @ApiModelProperty(name = "questionCount", value = "问题数量", example = "20")
    private Integer questionCount;
    @TableField("totalScore")
    @ApiModelProperty(name = "totalScore", value = "总分", example = "100")
    private Integer totalScore;
    @TableField("examDuration")
    @ApiModelProperty(name = "examDuration", value = "时长（分钟）", example = "90")
    private Integer examDuration;
    @TableField("teacherNo")
    @ApiModelProperty(name = "teacherNo", value = "教师编号", example = "0009")
    private Integer teacherNo;
    @TableField("fileName")
    @ApiModelProperty(name = "fileName", value = "生成试卷文件名称", example = "20210214001.docx")
    private String fileName;
    @TableField("fullPath")
    @ApiModelProperty(name = "fullPath", value = "全路径", example = "20210214001.docx")
    private String fullPath;
    @TableField("status")
    @ApiModelProperty(name = "status", value = "状态", example = "0,未生成，1,已生成未过期,2已过期")
    private Integer status;
    /**
     * 题目列表,数据库不存在的字段
     */
    @TableField(exist = false)
    private List<QuestionEntity> questionList;

}
